#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
#define rep(i, a, b) for (int i = (a); i <= (b); i++)
#define per(i, a, b) for (int i = (a); i >= (b); i--)
#define endl '\n'
const int N = 1e5 + 5;

int n, m;
struct Node {
  double mx;
  int cnt;
} tr[N << 2];
#define mx(p) tr[p].mx
#define cnt(p) tr[p].cnt

int get(double h, int p, int l, int r) {
  if (l == r) return mx(p) > h ? 1 : 0;
  int mid = (l + r) >> 1;
  if (h < mx(p << 1)) {
    int x = cnt(p) - cnt(p << 1);
    int y = get(h, p << 1, l, mid);
    return x + y;
  } else
    return get(h, p << 1 | 1, mid + 1, r);
}
void pushup(int p, int l, int r) {
  int mid = (l + r) >> 1;
  mx(p) = max(mx(p << 1), mx(p << 1 | 1));
  cnt(p) = cnt(p << 1) + get(mx(p << 1), p << 1 | 1, mid + 1, r);
}
void update(int x, double h, int p, int l, int r) {
  if (l == r) {
    cnt(p) = (h > 0.0 ? 1 : 0);
    mx(p) = h;
    return;
  }
  int mid = (l + r) >> 1;
  if (x <= mid) update(x, h, p << 1, l, mid);
  if (x > mid) update(x, h, p << 1 | 1, mid + 1, r);
  pushup(p, l, r);
}
int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  cin >> n >> m;
  while (m--) {
    int x, y;
    cin >> x >> y;
    update(x, y * 1.0 / x, 1, 1, n);
    cout << cnt(1) << endl;
  }
  return 0;
}